package com.glsc.ngateway.flowable.constant;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Component;

import java.util.HashMap;
import java.util.Map;

@Component
public class FlowableConstant {

    public static final String AMPROD = "amprod";

    public static final String YSP = "ysp";
    public static final String AM_PROD_O32_NEW_FUND_MAINTENANCE_FLOW = "AmProdO32NewFundMaintenanceFlow";
    public static final String CREATE_AM_INVEST_CONSULT_PROD = "CreateAmInvestConsultProd";
    public static final String CREATE_AM_PRODUCT = "CreateAmProduct";
    public static final String BACK_TAG ="【退回】";


    public static final String UP_FILE = "/opt/ngateway/flowable/uploaded_files/";
    //  public static final String UP_FILE = "D:\\uploaded_files\\";

    //    public static final String DOC_WEB_URL = "http://172.16.203.200:52621/oaDownloadAppendix/";
    @Value("${app.docWebUrl}")
    public String DOC_WEB_URL;

    @Value("${app.docWebUrlOa}")
    public String DOC_WEB_URL_OA;

    @Value("${demand.workFlowId}")
    public String WORK_FLOW_ID;

    public static final String AM_PROD_FORWARD_FLOW = "Forward";
    public static final String AM_PROD_FORWARD_TASK = "forwardTask";
    public static final String FLOWABLE_TASK_HANDLE_STATUS_NONE = "NONE";
    public static final String FLOWABLE_TASK_HANDLE_STATUS_READ = "READ";
    public static final String FLOWABLE_TASK_HANDLE_STATUS_SIGN = "SIGN";

    public static Map<String, String> keyToElementMap = new HashMap<String, String>();

    //    vc_department vc_system_id
//    vc_staff dt_create_time
//    vc_original_staff c_demand_type
//    vc_demand_detail vc_demand_document
//    vc_demand_url vc_process_instance_id
//    dt_op_time c_demand_emerge_level
//    vc_solution_general vc_solution_document
//    vc_onlineinfo vc_arrangeinfo
//    vc_original_staff_name
    static {
        keyToElementMap.put("department", "需求提出部门");
        keyToElementMap.put("staff", "需求提出人");
        keyToElementMap.put("systemId", "需求相关系统");
        keyToElementMap.put("createTime", "需求创建时间");
        keyToElementMap.put("originalStaff", "原始需求人");
        keyToElementMap.put("demandType", "需求类别");
        keyToElementMap.put("demandDetail", "需求描述");
        keyToElementMap.put("demandUrl", "需求关联页面");
        keyToElementMap.put("solutionGeneral", "技术解决方案");
    }


    public static Map<String, String> systemToChineseMap = new HashMap<String, String>();

    static {
        systemToChineseMap.put("glam", "资管数据平台");
        systemToChineseMap.put("amprod", "产品管理系统");
        systemToChineseMap.put("glgateway", "国联技术服务平台");
        systemToChineseMap.put("ysp", "场外衍生品系统");
//        systemToChineseMap.put("crm", "客户关系管理系统");
        systemToChineseMap.put("glscdata", "国联自营数据平台");
        systemToChineseMap.put("glrms", "国联市场风险管理系统");
        systemToChineseMap.put("trmportal", "风险管理统一门户");
        systemToChineseMap.put("glsubsidiary", "子公司数据平台");
        systemToChineseMap.put("oaecology", "国联E办公（OA系统）");
    }


    public static Map<String, String> typeToChineseMap = new HashMap<String, String>();

    static {
        typeToChineseMap.put("0", "业务-系统功能需求");
        typeToChineseMap.put("1", "业务-报表需求");
        typeToChineseMap.put("2", "业务-数据处理需求");
        typeToChineseMap.put("3", "内部-系统功能需求");
        typeToChineseMap.put("4", "内部-报表需求");
    }

    public static Map<String, String> levelToChineseMap = new HashMap<String, String>();

    static {
        levelToChineseMap.put("1", "一级");
        levelToChineseMap.put("2", "二级");
        levelToChineseMap.put("3", "三级");
    }


    public static Map<String, String> startTaskMap = new HashMap<String, String>();

    static {
        startTaskMap.put("AmInvestConsultEnd", "fqzzTask");
        startTaskMap.put("AmProdOpenDayFlow", "beginTask");
        startTaskMap.put("AmProductEnd", "beginTask");
        startTaskMap.put("CreateAmInvestConsultProd", "setupTask");
        startTaskMap.put("CreateAmProduct", "beginTask");
        startTaskMap.put("DemandManagement", "submitTask");
    }

    public static final String NODE_ARRIVED = "0";//已完成
    public static final String NODE_ACTIVE = "1";//active
    public static final String NODE_NO_ARRIVED = "2";//未到达

}
